package com.study.util.result;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.ToString;

@ToString
@AllArgsConstructor
public enum CommonsResultCode implements ResultCode{

    SUCCESS(true, 0, "success"),
    FAIL(false, -1000, "error"),
    LOGIN_FAIL(false, -1001, "账户或密码错误");

    private boolean success;
    private Integer code;
    private String message;

    @Override
    public boolean isSuccess() {
        return success;
    }

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }

}
